package com.example.miaosha.mapper;

import com.example.miaosha.entity.Promo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created by lerry_li on 2020/10/22
 */
@Mapper
public interface PromoMapper {
    @Select("SELECT * FROM promo WHERE id = #{id}")
    Promo selectByPrimaryId(Integer id);

    @Select("SELECT * FROM promo WHERE item_id = #{itemId}")
    Promo selectByItemId(Integer itemId);
}
